package top.api.common;

/**
 * 设置线程独立副本唯一变量
 */
public class BaseContext {

    private static final ThreadLocal<Object> threadVariable = new ThreadLocal<>();

    public static void set(Long value) {
        threadVariable.set(value);
    }

    public static Long get() {

        return Long.parseLong(String.valueOf(threadVariable.get()));
    }

    public static void remove() {
        threadVariable.remove();
    }
}
